import Vue from 'vue'
import VueRouter from 'vue-router'
const Home = () =>
    import ('../view/Home')
const Doc = () =>
    import ('../view/Doc')
const GetStarted = () =>
    import ('../components/GetStarted')
const Install = () =>
    import ('../components/Install')
const ButtonDemo = () =>
    import ('../components/Button/ButtonDemo')
const DialogDemo = () =>
    import ('../components/Dialog/DialogDemo')
const InputDemo = () =>
    import ('../components/Input/InputDemo')
const SwitchDemo = () =>
    import ('../components/Switch/SwitchDemo')
const PopoverDemo = () =>
    import ('../components/Popover/PopoverDemo')
const TabDemo = () =>
    import ('../components/Tabs/TabDemo')
const NoticeDemo = () =>
    import ('../components/Notice/NoticeDemo')


Vue.use(VueRouter)

const routes = [
    { path: '', redirect: '/home' },
    { path: "/home", component: Home },
    {
        path: "/doc",
        component: Doc,
        children: [
            { path: "", redirect: '/doc/install' },
            { path: "get-started", component: GetStarted },
            { path: "install", component: Install },
            { path: "input", component: InputDemo },
            { path: "button", component: ButtonDemo },
            { path: "dialog", component: DialogDemo },
            { path: "switch", component: SwitchDemo },
            { path: "popover", component: PopoverDemo },
            { path: "tabs", component: TabDemo },
            { path: "notice", component: NoticeDemo }
        ]
    }


]


const router = new VueRouter({
    routes
    // mode: 'history',
})

export default router